/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package DTO;

import BLL.BLLExport;
import BLL.BLLProduct;
import java.sql.ResultSet;
import java.sql.SQLException;

/**
 *
 * @author Pham
 */
public class DTOExportDetail {
    DTOExport dtoExport;
    DTOProduct dtoPro;
    int quantity;
    
    //accessor
    public DTOExport getDtoExport() {
        return dtoExport;
    }

    public void setDtoExport(DTOExport dtoExport) {
        this.dtoExport = dtoExport;
    }

    public DTOProduct getDtoPro() {
        return dtoPro;
    }

    public void setDtoPro(DTOProduct dtoPro) {
        this.dtoPro = dtoPro;
    }

    public int getQuantity() {
        return quantity;
    }

    public void setQuantity(int quantity) {
        this.quantity = quantity;
    }
    
    //constructor
    public DTOExportDetail() {
    }
    
    public DTOExportDetail(ResultSet rs) throws SQLException
    {
        this.dtoExport = (new BLLExport()).getExportbyId(rs.getString("export_id"));
        this.dtoPro = (new BLLProduct()).getProductbyID(rs.getInt("product_id"));
        this.quantity = rs.getInt("quantity");
    }
}
